import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询用户列表
export function listRegulations(query) {
  return request({
    url: '/aqsc/regulations/list',
    method: 'get',
    params: query
  })
}

//查询所属机构列表

export function getDeptList(){
    return request({
      url: '/system/user/deptTree',
      method: 'get',
    })
}
// 查询用户详细
export function getRegulations(id) {
  return request({
    url: '/aqsc/regulations/' + parseStrEmpty(id),
    method: 'get'
  })
}

// 新增用户
export function addRegulations(data) {
  return request({
    url: '/aqsc/regulations',
    method: 'post',
    data: data
  })
}

// 修改用户
export function updateRegulations(data) {
  return request({
    url: '/aqsc/regulations',
    method: 'put',
    data: data
  })
}

// 删除用户
export function delRegulations(ids) {
  return request({
    url: '/aqsc/regulations/' + ids,
    method: 'delete'
  })
}